gdk: Drop GdkWindowAttr
authorMatthias Clasen <mclasen@redhat.com>
Sun, 21 Apr 2019 16:24:07 +0000 (12:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 28 May 2019 20:25:14 +0000 (20:25 +0000)
All the information in it is already contained
in the surface object we pass along, and none
of the backend implementations were using the
attributes at all.

12 files changed:
gdk/broadway/gdkprivate-broadway.h
gdk/broadway/gdksurface-broadway.c
gdk/gdkdisplay.c
gdk/gdkdisplayprivate.h
gdk/gdkinternals.h
gdk/gdksurface.c
gdk/quartz/gdksurface-quartz.c
gdk/wayland/gdkprivate-wayland.h
gdk/wayland/gdksurface-wayland.c
gdk/win32/gdksurface-win32.c
gdk/x11/gdkprivate-x11.h
gdk/x11/gdksurface-x11.c

index 6f9e126dff4fbdda117305512e64afe0a401960a..5987c2c45483d7cf2f33ecccb463a6354a402eae 100644 (file)
@@ -103,8 +103,7 @@ void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
                                                     guint       *height);
 void       _gdk_broadway_display_create_surface_impl    (GdkDisplay    *display,
                                                          GdkSurface     *surface,
-                                                         GdkSurface     *real_parent,
-                                                         GdkSurfaceAttr *attributes);
+                                                         GdkSurface     *real_parent);
 gint _gdk_broadway_display_text_property_to_utf8_list (GdkDisplay    *display,
                                                        GdkAtom        encoding,
                                                        gint           format,
index ba798084fec5d4f66adc1b6965019bf00909e710..980f4090a0437b99c0e5c71ac2be19054917a593 100644 (file)
@@ -217,8 +217,7 @@ connect_frame_clock (GdkSurface *surface)
 void
 _gdk_broadway_display_create_surface_impl (GdkDisplay     *display,
                                            GdkSurface     *surface,
-                                           GdkSurface     *real_parent,
-                                           GdkSurfaceAttr *attributes)
+                                           GdkSurface     *real_parent)
 {
   GdkSurfaceImplBroadway *impl;
   GdkBroadwayDisplay *broadway_display;
index 3e7cb2c8472928fede1bbceeb31a1c26560aaad3..1290b78d553cfc6621e363d33ca96477e54f7332 100644 (file)
@@ -1327,13 +1327,11 @@ _gdk_display_event_data_free (GdkDisplay *display,
 void
 gdk_display_create_surface_impl (GdkDisplay       *display,
                                  GdkSurface       *surface,
-                                 GdkSurface       *real_parent,
-                                 GdkSurfaceAttr   *attributes)
+                                 GdkSurface       *real_parent)
 {
   GDK_DISPLAY_GET_CLASS (display)->create_surface_impl (display,
                                                         surface,
-                                                        real_parent,
-                                                        attributes);
+                                                        real_parent);
 }
 
 GdkSurface *
index 8a16a28f42a6215eb7f0f67fea23bed35ffa9466..496d023614ab458aeeefbaeaede54c2d15b45864 100644 (file)
@@ -143,8 +143,7 @@ struct _GdkDisplayClass
                                                  GdkEvent       *event);
   void                       (*create_surface_impl) (GdkDisplay    *display,
                                                      GdkSurface     *surface,
-                                                     GdkSurface     *real_parent,
-                                                     GdkSurfaceAttr *attributes);
+                                                     GdkSurface     *real_parent);
 
   GdkKeymap *                (*get_keymap)         (GdkDisplay    *display);
 
@@ -231,8 +230,7 @@ void                _gdk_display_event_data_free      (GdkDisplay       *display
                                                        GdkEvent         *event);
 void                gdk_display_create_surface_impl   (GdkDisplay       *display,
                                                        GdkSurface        *surface,
-                                                       GdkSurface        *real_parent,
-                                                       GdkSurfaceAttr    *attributes);
+                                                       GdkSurface        *real_parent);
 GdkSurface *         _gdk_display_create_surface      (GdkDisplay       *display);
 
 gboolean            gdk_display_make_gl_context_current  (GdkDisplay        *display,
index 4f3d3cfb1c81a64876a0c1ca35ffdc6f4e6a97a9..fd23582988b21357b7d716ebcb49b2b3764ec628 100644 (file)
@@ -42,8 +42,6 @@ G_BEGIN_DECLS
 
 /* Debugging support */
 
-typedef struct _GdkSurfaceAttr          GdkSurfaceAttr;
-
 typedef enum {
   GDK_DEBUG_MISC            = 1 <<  0,
   GDK_DEBUG_EVENTS          = 1 <<  1,
@@ -118,14 +116,6 @@ typedef enum
 
 typedef struct _GdkSurfacePaint GdkSurfacePaint;
 
-struct _GdkSurfaceAttr
-{
-  gint x, y;
-  gint width;
-  gint height;
-  GdkSurfaceType surface_type;
-};
-
 struct _GdkSurface
 {
   GObject parent_instance;
index d96d21452439a837300937d25dcfd1bb05afcb6b..74ad7af7562e8f3c8aee5fd15f4552dc613ca125 100644 (file)
@@ -483,7 +483,6 @@ gdk_surface_new (GdkDisplay     *display,
 {
   GdkSurface *surface;
   GdkFrameClock *frame_clock;
-  GdkSurfaceAttr attributes;
 
   surface = _gdk_display_create_surface (display);
 
@@ -491,22 +490,17 @@ gdk_surface_new (GdkDisplay     *display,
   surface->focus_on_map = TRUE;
   surface->alpha = 255;
 
+  surface->surface_type = surface_type;
   surface->x = x;
   surface->y = y;
   surface->width = width;
   surface->height = height;
-  surface->surface_type = surface_type;
 
   frame_clock = g_object_new (GDK_TYPE_FRAME_CLOCK_IDLE, NULL);
   gdk_surface_set_frame_clock (surface, frame_clock);
   g_object_unref (frame_clock);
 
-  attributes.surface_type = surface_type;
-  attributes.x = x;
-  attributes.y = y;
-  attributes.width = width;
-  attributes.height = height;
-  gdk_display_create_surface_impl (display, surface, NULL, &attributes);
+  gdk_display_create_surface_impl (display, surface, NULL);
   surface->impl_surface = surface;
 
   g_signal_connect (display, "seat-removed", G_CALLBACK (seat_removed_cb), surface);
index 78b8d0cf5b01cebab4bf37e9059ccee900570ce6..cf0cd15dd91185a5dd76710a1a221b18f4831a47 100644 (file)
@@ -734,8 +734,7 @@ get_nsscreen_for_point (gint x, gint y)
 void
 _gdk_quartz_display_create_surface_impl (GdkDisplay    *display,
                                         GdkSurface     *window,
-                                        GdkSurface     *real_parent,
-                                        GdkSurfaceAttr *attributes)
+                                        GdkSurface     *real_parent)
 {
   GdkSurfaceImplQuartz *impl;
   GdkSurfaceImplQuartz *parent_impl;
index 3cbe203ab0bb5791308ddf3ed49953f5d3651652..ff4abf2146680233bee0d9176de6a29ed9225873 100644 (file)
@@ -118,8 +118,7 @@ void             gdk_wayland_drop_set_action               (GdkDrop
 
 void _gdk_wayland_display_create_surface_impl (GdkDisplay     *display,
                                                GdkSurface     *surface,
-                                               GdkSurface     *real_parent,
-                                               GdkSurfaceAttr *attributes);
+                                               GdkSurface     *real_parent);
 
 gint        _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay    *display,
                                                              GdkAtom        encoding,
index 55609fde2850254a8e62c76589c6d306960fdf3d..d8f6e24fcdf40ca988b4890bab89df71fc673756 100644 (file)
@@ -545,8 +545,7 @@ static void gdk_wayland_surface_create_surface (GdkSurface *surface);
 void
 _gdk_wayland_display_create_surface_impl (GdkDisplay     *display,
                                           GdkSurface     *surface,
-                                          GdkSurface     *real_parent,
-                                          GdkSurfaceAttr *attributes)
+                                          GdkSurface     *real_parent)
 {
   GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
   GdkSurfaceImplWayland *impl;
index 57af9d9b95d1380c56c86fdef15db32405a8fd2e..713afc034f8a821b41906937243ee215d21227bd 100644 (file)
@@ -520,18 +520,12 @@ RegisterGdkClass (GdkSurfaceType wtype, GdkSurfaceTypeHint wtype_hint)
  * except for toplevel window where OS/Window Manager placement
  * is used.
  *
- * From attributes the only things used is: colormap, title,
- * wmclass and type_hint. [1]. We are checking redundant information
- * and complain if that changes, which would break this implementation
- * again.
- *
  * [1] http://mail.gnome.org/archives/gtk-devel-list/2010-August/msg00214.html
  */
 void
 _gdk_win32_display_create_surface_impl (GdkDisplay    *display,
                                       GdkSurface     *window,
-                                      GdkSurface     *real_parent,
-                                      GdkSurfaceAttr *attributes)
+                                      GdkSurface     *real_parent)
 {
   HWND hwndNew;
   HANDLE hparent;
@@ -550,9 +544,8 @@ _gdk_win32_display_create_surface_impl (GdkDisplay    *display,
   g_return_if_fail (display == _gdk_display);
 
   GDK_NOTE (MISC,
-            g_print ("_gdk_surface_impl_new: %s %s\n", (window->surface_type == GDK_SURFACE_TOPLEVEL ? "TOPLEVEL" :
-                                                       (window->surface_type == GDK_SURFACE_TEMP ? "TEMP" : "???")),
-                                                       (attributes->wclass == GDK_INPUT_OUTPUT ? "" : "input-only")));
+            g_print ("_gdk_surface_impl_new: %s\n", (window->surface_type == GDK_SURFACE_TOPLEVEL ? "TOPLEVEL" :
+                                                       (window->surface_type == GDK_SURFACE_TEMP ? "TEMP" : "???")));
 
   hparent = (real_parent != NULL) ? GDK_SURFACE_HWND (real_parent) : NULL;
 
index 658a2d9b5aedb8e5c536ae289c14f6e68dae2207..345439fb8c2b22dfa73e15eea3495b6025e5164e 100644 (file)
@@ -178,8 +178,7 @@ void       _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display,
                                                      guint      *height);
 void       _gdk_x11_display_create_surface_impl     (GdkDisplay    *display,
                                                      GdkSurface     *window,
-                                                     GdkSurface     *real_parent,
-                                                     GdkSurfaceAttr *attributes);
+                                                     GdkSurface     *real_parent);
 GList *    gdk_x11_display_get_toplevel_windows     (GdkDisplay *display);
 
 void _gdk_x11_precache_atoms (GdkDisplay          *display,
index 9bb117ded5421cb18314bf41a2297bb95aa8af8e..802d42dfab475792766d2d456da014b33709a177 100644 (file)
@@ -814,8 +814,7 @@ connect_frame_clock (GdkSurface *surface)
 void
 _gdk_x11_display_create_surface_impl (GdkDisplay    *display,
                                       GdkSurface     *surface,
-                                      GdkSurface     *real_parent,
-                                      GdkSurfaceAttr *attributes)
+                                      GdkSurface     *real_parent)
 {
   GdkSurfaceImplX11 *impl;
   GdkX11Screen *x11_screen;